package 补充.日期操作;
import java.util.Date;
import java.text.SimpleDateFormat;
public class SimpleDateFormat类 {
    public static void main(String[] args) {
        SimpleDateFormat sdf=new  SimpleDateFormat();
        String date=sdf.format(new Date());
        System.out.println(date);
        SimpleDateFormat sdf2=new  SimpleDateFormat("yyyy-MM-dd");
        System.out.println(sdf2.format(new Date()));
        SimpleDateFormat sdf1=new  SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(sdf1.format(new Date()));
    }
}
